package com.iwomy.secureplat.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * OpenAPI对接表
 *
 * @author pig
 * @date 2023-11-06 15:41:41
 */
@Data
@TableName("basic_openapi")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "OpenAPI对接表")
public class BasicOpenapiEntity extends Model<BasicOpenapiEntity> {


	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description = "ID")
	private Long id;

	/**
	 * API名称
	 */
	@Schema(description = "API名称")
	private String apiName;

	/**
	 * URL
	 */
	@Schema(description = "URL")
	private String apiUrl;

	/**
	 * IMEI
	 */
	@Schema(description = "IMEI")
	private Long imei;

	/**
	 * 请求方法
	 */
	@Schema(description = "请求方法")
	private Integer requestType;

	/**
	 * 响应类型
	 */
	@Schema(description = "响应类型")
	private Integer responseType;

	/**
	 * 推送类型
	 */
	@Schema(description = "推送类型")
	private String pushName;

	/**
	 * 内容
	 */
	@Schema(description = "内容")
	private String content;

	/**
	 * 结果
	 */
	@Schema(description = "结果")
	private String result;

	/**
	 * 授权方式
	 */
	@Schema(description = "授权方式")
	private Integer authType;

	/**
	 * API key
	 */
	@Schema(description = "API key")
	private String apiKey;

	/**
	 * Oauth令牌
	 */
	@Schema(description = "Oauth令牌")
	private String oauthToken;

	/**
	 * 10启用 20禁用
	 */
	@Schema(description = "10启用 20禁用")
	private Integer state;

	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 修改时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@Schema(description = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 是否被删除标记（0未删除；1已删除）
	 */
	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "是否被删除标记（0未删除；1已删除）")
	private String delFlag;

	/**
	 * 租户ID
	 */
	@Schema(description="租户ID")
	private Long tenantId;

	/**
	 * 单位ID
	 */
	@Schema(description="单位ID")
	private Long deptId;
}